﻿@model Model.EntrustManage.E_tb_TestingPlan
@{
    ViewBag.Title = "TestingPlanEdit";
}
<!DOCTYPE html>

<head>
    <meta name="viewport" content="width=device-width" />
    <title></title>
</head>
<body>
        @using (Ajax.BeginForm("Save", "TestingPlan", new AjaxOptions { HttpMethod = "Post", OnSuccess = "handle", OnFailure = "failed" }, new { @id = "frmUpdate" }))
        {
            @Html.HiddenFor(m => m.TestID, new { @id = "HidTestID" })
            @Html.HiddenFor(m => m.EditType, new { @id = "HidEditType" })
            <table border="0" cellpadding="0" cellspacing="0" width="98%" class="DialogTable">
                <tr>
                    <td width="70px" align="right">计划名称：</td>
                    <td align="left" style="width:160px;">@Html.TextBoxFor(m => m.PlanName, new { @style = "width:99%;", @id = "txt_PlanName" })</td>
                    <td width="70px" align="right">版本：</td>
                    <td align="left" >@Html.TextBoxFor(m => m.Version, new { @style = "width:99%;", @id = "txt_Version" })</td>
                </tr>
                <tr>
                    <td align="right">受控号：</td>
                    <td align="left">@Html.TextBoxFor(m => m.ControlledNum, new { @style = "width:99%;", @id = "txt_ControlledNum" })</td>
                    <td align="right">编制单位：</td>
                    <td align="left" >@Html.TextBoxFor(m => m.Department, new { @style = "width:99%;", @id = "txt_Department" })</td>
                </tr>
                <tr>
                    <td align="right">编制者：</td>
                    <td align="left">@Html.TextBoxFor(m => m.WeavePersonnel, new { @style = "width:99%;", @id = "txt_WeavePersonnel" })</td>
                    <td align="right">编制日期：</td>
                    <td align="left" >@Html.TextBoxFor(m => m.WeaveTime, new { @style = "width:99%;", @onclick = "WdatePicker()", @id = "txt_WeaveTime" })</td>
                </tr>
                <tr>
                    <td align="right">计划详情：</td>
                    <td align="left">@Html.TextBoxFor(m => m.FilePath, new { @style = "width:95%;", @id = "txt_FilePath" })</td>
                    <td align="right">&nbsp;&nbsp;<input type="text" id="uploadify_File" /></td>
                    <td align="left" ></td>
                </tr>
                <tr>
                    <td align="right">描述：</td><td align="left" colspan="5">@Html.TextAreaFor(m => m.Remark, new { @style = "height:100px;width:99%;", @id = "txt_Description" })</td>
                </tr>
                <tr>
                    <td colspan="4" align="center">
                        <a href="javascript:void(0)" onclick="$('#frmUpdate').submit()"><img src="~/Content/Images/baocun.png" height="20px" /></a>
                        <a href="javascript:void(0)" onclick="Close()"><img src="~/Content/Images/quxiao.png" height="20px" /></a>
                    </td>
                </tr>
            </table>
        }
        <!--文件上传-->
<script type="text/javascript">
    /*上传文件控件*/
    $("#uploadify_File").uploadify({
        'uploader': '@Url.Content("~/Scripts/uploader/uploadify.swf")',
        'script': '@Url.Action("Import", "ShowImage")',
        'cancelImg': '@Url.Content("~/Scripts/uploader/cancel.png")',
        'folder': 'UpFile',
        'queueID': 'fileQueue',
        'auto': false,
        'multi': false,
        'height': 20,
        'width': 75,
        'fileSizeLimit': '10240KB',
        'fileTypeDesc': '文档类型',
        'fileTypeExts': '*.doc;*.pdf;*.jpg;*.png;*.gif;*.bmp;*.*;',
        'buttonImg': '@Url.Content("~/Content/Images/daochuwenjian.png")',
        'onComplete': funFile,
        'onSelect': function (e, queueId, fileObj) {
            $('#uploadify_File').uploadifyUpload();
        },
        'onCancel': function (file) {
        }
    });
    /*结束 上传文件控件*/
    function funFile(event, queueID, fileObj, response, data) {
        if (response == "false") {
            alert("文件上传出错！");
        }
        else {
            $('#txt_FilePath').val(response);
            alert("成功上传！");
        }
    }
    </script>
</body>